import {createRouter,createWebHashHistory,createWebHistory, RouteRecord, RouteRecordRaw} from 'vue-router'
import { ElMessage } from 'element-plus'

import Nav from './pages/NavPage.vue'

export const Menus:RouteRecordRaw[] = [
    {path:"home",name:"home",component:()=>import("./pages/Home.vue")},
    {path:"users",name:"users",component:()=>import("./pages/Organization/UsersManage.vue")},
    {path:"account",name:"account",component:()=>import("./pages/Organization/AccountManage.vue")},
    {path:"menu",name:"menu",component:()=>import("./pages/Organization/MenuManage.vue")},
    {path:"rangeList",name:"rangeList",component:()=>import("./pages/Range/RangeList.vue")},
    {path:"newRange",name:"newRange",component:()=>import("./pages/Range/NewRange.vue")},
]

export const router = createRouter({
    history:createWebHashHistory(),
    routes:[
        {path:"/",redirect:"/nav"},
        {path:"/nav",component:Nav,name:"nav",
            children:Menus
        }
    ]
})